﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="formPrestador.aspx.cs" Inherits="Worcamento.Prestador.Form.formPrestador" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <div id="page-wrapper">
		<div id="main-wrapper">
			<div id="main-content">
                <asp:HiddenField ID="hdfCoPrestadorRemover" runat="server"></asp:HiddenField>
                <!-- Área de Validação abaixo -->
                <div style="display:none;">
                    <asp:HyperLink ID="linkMsn" runat="server">HyperLink</asp:HyperLink>
                </div>
                <asp:ModalPopupExtender ID="ModalPopupRemover" TargetControlID="linkMsn" runat="server"
                    PopupControlID="PainelMsn" CancelControlID="btnCancelarMsn" BackgroundCssClass="modalBackground">
                </asp:ModalPopupExtender>
                <asp:Panel ID="PainelMsn" runat="server" Style="display: none" Width="350px" CssClass="modalPopup">
                    <asp:Panel ID="PainelCabecalho" runat="server" Style="height: 25px;">
                        <div>
                            <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" style="font-size: 10px">
                                <span class="ui-dialog-title" id="ui-dialog-title-login">
                                    Atenção
                                </span> 
                            </div>
                            <div style="text-align:center">
                                <b><p>Deseja remover esse Prestador?</p></b>
                                <div style="float: right">
				                    <asp:LinkButton ID="lkbSim" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" OnClick="lkbSim_Click" ><span class="ui-icon ui-icon-check"></span>Sim</asp:LinkButton>
			                        <asp:LinkButton ID="lkbNao" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" OnClick="lkbNao_Click" ><span class="ui-icon ui-icon-cancel"></span>Não</asp:LinkButton>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <!-- Final Área de Validação -->
				<div class="title title-spacing">
					<h2>Prestadores</h2>
                    Prestadores de Serviços.
				</div>
                <div class="response-msg success ui-corner-all" runat="server" id="divMsnPesquisaSucesso" visible="false">
					<span>Sucesso!</span>
					<asp:Label ID="lblNumEncontrados" runat="server" Text="" />.
				</div>
                <div class="response-msg notice ui-corner-all" runat="server" id="divMsnPesquisaAtencao" visible="false">
					<span>Atenção!</span>
					Não foram encontrados nenhum registro com essas informações.
				</div>
                <div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					<div class="portlet-header ui-widget-header">Pesquisa</div>
					<div class="portlet-content">
					    <ul>
						    <li>
							    <label  class="desc">
								    Nome Fantasia
							    </label>
							    <div>
                                    <asp:TextBox ID="txtNoFantasia" MaxLength="255" CssClass="field text small" runat="server" Text=""></asp:TextBox>
							    </div>
						    </li>
                            <li>
                                <label  class="desc">
								    CPF/CNPJ
							    </label>
                                <div>
                                    <asp:DropDownList ID="ddlCfpCnpj" runat="server" CssClass="field" 
                                        onselectedindexchanged="ddlCfpCnpj_SelectedIndexChanged" AutoPostBack="true">
                                        <asp:ListItem Text="CPF" Value="1"/>
                                        <asp:ListItem Text="CNPJ" Value="2"/>
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtCpfCnpj" Width="90px" CssClass="field text small" runat="server" Text=""></asp:TextBox>
                                    <asp:MaskedEditExtender ID="mask_txtCpfCnpj" runat="server"
                                        MaskType="Number" TargetControlID="txtCpfCnpj"
                                        Mask="999,999,999-99" AutoComplete="false" InputDirection="RightToLeft" ClearMaskOnLostFocus="false">
                                    </asp:MaskedEditExtender>
							    </div>
						    </li>
                            <li>
                                <label  class="desc">
								    Status
							    </label>
                                <div>
                                    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="field">
                                        <asp:ListItem Text="Selecione o Status" Value="0"/>
                                        <asp:ListItem Text="Ativo" Value="1"/>
                                        <asp:ListItem Text="Inativo" Value="2"/>
                                    </asp:DropDownList>
							    </div>
						    </li>
                            <li class="buttons">
                                <div>
				                    <asp:LinkButton ID="lkbPesquisar" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" onclick="lkbPesquisar_Click"><span class="ui-icon ui-icon-search"></span>Pesquisar</asp:LinkButton>
			                    </div>
							</li>
                        </ul>
                    </div>
                </div>
				<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					<div class="portlet-header ui-widget-header">Resultado da Pesquisa</div>
					<div class="portlet-content">
                        <div>
                            <asp:GridView ID="grdResPestadores" runat="server" AutoGenerateColumns="False" 
                                onrowcommand="grdResPestadores_RowCommand" 
                                onpageindexchanging="grdResPestadores_PageIndexChanging" BackColor="White" 
                                BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                                Width="100%"  ForeColor="Black" GridLines="Vertical" >
                                <Columns>
                                    <asp:BoundField DataField="NO_FANTASIA" HeaderText="Nome Fantasia" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="NR_CNPJ" HeaderText="CNPJ" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="NR_CPF" HeaderText="CPF" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DS_TEL_RESP" HeaderText="Tel. Responsável" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DS_EMAIL_RESP" HeaderText="Email Responsável" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DS_STATUS" HeaderText="Status" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:TemplateField>
                                        <ItemStyle Width="100px" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1"/>
                                        <ItemTemplate>
                                            <asp:linkbutton CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Editar" text="" runat="server" CommandName="editar" CommandArgument='<%# Eval("CO_PRESTADOR")%>'><span class="ui-icon ui-icon-wrench"></span></asp:linkbutton>
                                            <asp:linkbutton CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Remover" text="" runat="server" CommandName="remover" CommandArgument='<%# Eval("CO_PRESTADOR")%>'><span class="ui-icon ui-icon-trash"></span></asp:linkbutton>
                                            <asp:linkbutton CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Visualizar" text="" runat="server" CommandName="visualizar" CommandArgument='<%# Eval("CO_PRESTADOR")%>'><span class="ui-icon ui-icon-search"></span></asp:linkbutton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle CssClass="headerGrid" />
                                <RowStyle  CssClass="trGrid" />
                                <PagerStyle CssClass="trPager" />
                            </asp:GridView>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
